
index = 0
for i in range(2,10000):
    sum = 0
    for j in range(1,i+1):
        if i % j == 0:
            sum += j
    if sum == i*2:
        print(i,end=' ')
        index += 1

    if index > 4:
        break

